home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / Interfaces&Libraries / Universal / Interfaces / AIncludes / CTBUtilities.a < prev    next >
Encoding:
Text File  |  1998-08-17  |  4.4 KB  |  176 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        CTBUtilities.a
  3. ;
  4. ;    Contains:    Communications Toolbox Utilities interfaces.
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Release:    Universal Interfaces 3.2
  8. ;
  9. ;    Copyright:    © 1988-1993, 1995-1998 by Apple Computer, Inc., all rights reserved
  10. ;
  11. ;    Bugs?:        For bug reports, consult the following page on
  12. ;                the World Wide Web:
  13. ;
  14. ;                    http://developer.apple.com/bugreporter/
  15. ;
  16. ;
  17.     IF &TYPE('__CTBUTILITIES__') = 'UNDEFINED' THEN
  18. __CTBUTILITIES__ SET 1
  19.  
  20.     IF &TYPE('__CONDITIONALMACROS__') = 'UNDEFINED' THEN
  21.     include 'ConditionalMacros.a'
  22.     ENDIF
  23.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  24.     include 'MacTypes.a'
  25.     ENDIF
  26.     IF &TYPE('__MIXEDMODE__') = 'UNDEFINED' THEN
  27.     include 'MixedMode.a'
  28.     ENDIF
  29.     IF &TYPE('__DIALOGS__') = 'UNDEFINED' THEN
  30.     include 'Dialogs.a'
  31.     ENDIF
  32.     IF &TYPE('__APPLETALK__') = 'UNDEFINED' THEN
  33.     include 'AppleTalk.a'
  34.     ENDIF
  35.  
  36.  
  37. curCTBUVersion                    EQU        2                    ; version of Comm Toolbox Utilities
  38.  
  39.                                                             ;    Error codes/types    
  40. ctbuGenericError                EQU        -1
  41. ctbuNoErr                        EQU        0
  42. ; typedef OSErr                         CTBUErr
  43.  
  44.  
  45. chooseDisaster                    EQU        -2
  46. chooseFailed                    EQU        -1
  47. chooseAborted                    EQU        0
  48. chooseOKMinor                    EQU        1
  49. chooseOKMajor                    EQU        2
  50. chooseCancel                    EQU        3
  51. ; typedef unsigned short                 ChooseReturnCode
  52.  
  53.  
  54. nlOk                            EQU        0
  55. nlCancel                        EQU        1
  56. nlEject                            EQU        2
  57. ; typedef unsigned short                 NuLookupReturnCode
  58.  
  59.  
  60. nameInclude                        EQU        1
  61. nameDisable                        EQU        2
  62. nameReject                        EQU        3
  63. ; typedef unsigned short                 NameFilterReturnCode
  64.  
  65.  
  66. zoneInclude                        EQU        1
  67. zoneDisable                        EQU        2
  68. zoneReject                        EQU        3
  69. ; typedef unsigned short                 ZoneFilterReturnCode
  70.  
  71.  
  72.                                                             ;    Values for hookProc items        
  73. hookOK                            EQU        1
  74. hookCancel                        EQU        2
  75. hookOutline                        EQU        3
  76. hookTitle                        EQU        4
  77. hookItemList                    EQU        5
  78. hookZoneTitle                    EQU        6
  79. hookZoneList                    EQU        7
  80. hookLine                        EQU        8
  81. hookVersion                        EQU        9
  82. hookReserved1                    EQU        10
  83. hookReserved2                    EQU        11
  84. hookReserved3                    EQU        12
  85. hookReserved4                    EQU        13                    ;    "virtual" hookProc items    
  86. hookNull                        EQU        100
  87. hookItemRefresh                    EQU        101
  88. hookZoneRefresh                    EQU        102
  89. hookEject                        EQU        103
  90. hookPreflight                    EQU        104
  91. hookPostflight                    EQU        105
  92. hookKeyBase                        EQU        1000
  93.  
  94. ;     NuLookup structures/constants    
  95. NLTypeEntry                RECORD 0
  96. hIcon                     ds.l    1                ; offset: $0 (0)
  97. typeStr                     ds        Str32            ; offset: $4 (4)
  98.                          ORG 38
  99. sizeof                     EQU *                    ; size:   $26 (38)
  100.                         ENDR
  101. NLType                    RECORD 0
  102. elements                 ds.b    4 * NLTypeEntry.sizeof
  103. sizeof                     EQU *                    ; size:   $98 (152)
  104.                         ENDR
  105.  
  106.  
  107. NBPReply                RECORD 0
  108. theEntity                 ds        EntityName        ; offset: $0 (0)
  109. theAddr                     ds        AddrBlock        ; offset: $66 (102)
  110. sizeof                     EQU *                    ; size:   $6A (106)
  111.                         ENDR
  112. ;
  113. ; pascal CTBUErr InitCTBUtilities(void )
  114. ;
  115.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  116.         Macro
  117.         _InitCTBUtilities
  118.             move.w              #$0401,-(sp)
  119.             move.l              sp,A0
  120.             dc.w                $A08B
  121.             addq.w              #2,sp
  122.         EndM
  123.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  124.         IMPORT_CFM_FUNCTION InitCTBUtilities
  125.     ENDIF
  126.  
  127. ;
  128. ; pascal short CTBGetCTBVersion(void )
  129. ;
  130.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  131.         Macro
  132.         _CTBGetCTBVersion
  133.             move.w              #$0405,-(sp)
  134.             move.l              sp,A0
  135.             dc.w                $A08B
  136.             addq.w              #2,sp
  137.         EndM
  138.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  139.         IMPORT_CFM_FUNCTION CTBGetCTBVersion
  140.     ENDIF
  141.  
  142. ;
  143. ; pascal short StandardNBP(Point where, ConstStr255Param prompt, short numTypes, NLType typeList, NameFilterUPP nameFilter, ZoneFilterUPP zoneFilter, DialogHookUPP hook, NBPReply *theReply)
  144. ;
  145.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  146.         Macro
  147.         _StandardNBP
  148.             move.w              #$0406,-(sp)
  149.             move.l              sp,A0
  150.             dc.w                $A08B
  151.             addq.w              #2,sp
  152.         EndM
  153.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  154.         IMPORT_CFM_FUNCTION StandardNBP
  155.     ENDIF
  156.  
  157. ;
  158. ; pascal short CustomNBP(Point where, ConstStr255Param prompt, short numTypes, NLType typeList, NameFilterUPP nameFilter, ZoneFilterUPP zoneFilter, DialogHookUPP hook, long userData, short dialogID, ModalFilterUPP filter, NBPReply *theReply)
  159. ;
  160.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  161.         Macro
  162.         _CustomNBP
  163.             move.w              #$0407,-(sp)
  164.             move.l              sp,A0
  165.             dc.w                $A08B
  166.             addq.w              #2,sp
  167.         EndM
  168.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  169.         IMPORT_CFM_FUNCTION CustomNBP
  170.     ENDIF
  171.  
  172.     IF OLDROUTINENAMES THEN
  173.     ENDIF    ; OLDROUTINENAMES
  174.     ENDIF ; __CTBUTILITIES__ 
  175.  
  176.